package com.bay1ts.utils;

import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

/**
 * Created by chenuu on 2016/4/7.
 */
public class Term {
    public static int whichTerm(){
        Calendar calendar=Calendar.getInstance();
        int month=calendar.get(calendar.MONTH)+1;
        if(month>=3&&month<=8){
            //下学期
            return 2;
        }else if (month>9&&month<=12){
            //上学期
            return 1;
        }else if (month<3&&month>=1){
            //上学期
            return 1;
        }else {
            return 0;
        }
    }
}
